import request from '@/utils/request'

// 查询能源购买列表
export function listPurchasedEnergy(query) {
  return request({
    url: '/purchasedEnergy/purchasedEnergy/list',
    method: 'get',
    params: query
  })
}

// 查询能源购买详细
export function getPurchasedEnergy(id) {
  return request({
    url: '/purchasedEnergy/purchasedEnergy/' + id,
    method: 'get'
  })
}

// 新增能源购买
export function addPurchasedEnergy(data) {
  return request({
    url: '/purchasedEnergy/purchasedEnergy',
    method: 'post',
    data: data
  })
}

// 修改能源购买
export function updatePurchasedEnergy(data) {
  return request({
    url: '/purchasedEnergy/purchasedEnergy',
    method: 'put',
    data: data
  })
}

// 删除能源购买
export function delPurchasedEnergy(id) {
  return request({
    url: '/purchasedEnergy/purchasedEnergy/' + id,
    method: 'delete'
  })
}

// 导出能源购买
export function exportPurchasedEnergy(query) {
  return request({
    url: '/purchasedEnergy/purchasedEnergy/export',
    method: 'get',
    params: query
  })
}